Custom Export Numbering

We have a module that includes several different views that represent different documents. We then do a basic Word export into different base templates which add a front page and TOC. What we are wondering is if there is a .dxl scrip which would allow us to leave off the DOORS numbering scheme and add a custom scheme based on the template being exported into. We have some users that don't like it when we skip numbers even though some objects are not included in every view and they want to be able to simply renumber the objects based on what is included in the view being exported. I am a total novice at coding .dxl (I have modified some scripts that I found and some that were given to us but have never written any on my own). Any and all help would be appreciated. Thanks.
ChristiFore - Wed Apr 11 12:34:48 EDT 2012

Re: Custom Export Numbering
adevicq - Wed Apr 11 12:43:51 EDT 2012

Hi,

It may be easier in this case to create a custom style in MS Word that automatically numbers your requirements. Could it fit your need?

Alain

Re: Custom Export Numbering
adevicq - Wed Apr 11 12:44:56 EDT 2012

adevicq - Wed Apr 11 12:43:51 EDT 2012
Hi,

It may be easier in this case to create a custom style in MS Word that automatically numbers your requirements. Could it fit your need?

Alain

... but your identifiers may change from one export to another if you insert requirements in you module...

Re: Custom Export Numbering
llandale - Wed Apr 11 13:58:31 EDT 2012

I think this a bad idea since the numbering will change between exports. That will be like talking to the "5th person in line" when the line keeps changing. Readers of the report are far better off seeing a paragraph and being able to tell which DOORS Object it is.

Anyway, if you put the code below into an "int" AttrDXL and then display it, the objects should be numbered from zero on down based on the current display set. Be sure to Tools menu >>Refresh DXL Attributes before you export.

int iResult
Object oPrev = previous(obj)
if (null oPrev) //
then iResult = -1
else iResult = oPrev.attrDXLName
obj.attrDXLName = iResult+1
 
//print iResult "\t" (identifier(obj)) "\t"
//if (null oPrev)//
//then print "top\n"
//else print identifier(oPrev) "\n"


-Louie

Re: Custom Export Numbering
ChristiFore - Wed Apr 11 17:12:21 EDT 2012

llandale - Wed Apr 11 13:58:31 EDT 2012

I think this a bad idea since the numbering will change between exports. That will be like talking to the "5th person in line" when the line keeps changing. Readers of the report are far better off seeing a paragraph and being able to tell which DOORS Object it is.

Anyway, if you put the code below into an "int" AttrDXL and then display it, the objects should be numbered from zero on down based on the current display set. Be sure to Tools menu >>Refresh DXL Attributes before you export.

int iResult
Object oPrev = previous(obj)
if (null oPrev) //
then iResult = -1
else iResult = oPrev.attrDXLName
obj.attrDXLName = iResult+1
 
//print iResult "\t" (identifier(obj)) "\t"
//if (null oPrev)//
//then print "top\n"
//else print identifier(oPrev) "\n"


-Louie

I understand your concern however the sections in each document are static so once the format is set it won't change very often. It will however be different for each document type but we really only use 2 type. One is the standard numbering and the other is a subset of the standard. I'll give your code a try.